<?php
/**
 * 周舟 hzboye010@163.com
 * addby sublime snippets
 * 用户积分,经验记录表 model
 */
namespace app\system\model;
use think\Model;

class UserLog extends model{
	//积分别名
	const SCORE = "萌币";
	//经验别名
	const EXP   = "经验";
	//支付比例 score*rate
	const RATE  = 1;

	//op_type,score,exp...
	//op_type对应数据库

	//100+
	//注册								--done
	const REGISTER        = '101,20,0';
	//邀请注册						--done
	const REGISTER_INVITE = '102,40,0';
	//首次更新头像   			--done
	const FIRST_AVATAR    = '103,20,0';
	//首次更新收货地址		--done
	const FIRST_ADDRESS   = '104,50,0';
	//签到
	const SIGN            = '105,5,0';

	//200+
	//发帖  后台需要同步  --done(api)
	const THREAD_ADD      = '201,2,0';
	//删帖  后台需要同步	--done(api)
	const THREAD_DELETE   = '202,-2,0';
	//收到回复						--done
	const POST_ME         = '203,1,0';

	//回帖								--done
	const POST_ADD        = '204,1,0';
	//删回复 后台需要同步 --done
	const POST_DELETE     = '205,-1,0';
	//评论
	const COMMENT_ADD     = '206,0,0';
	// 删除评论
	const COMMENT_DELETE  = '207,0,0';

	//300+
	const EXCHANGE_SGOODS = '301';

	protected $trueTableName = 'itboye_user_log';
}